<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    Array.prototype.max = function(){
      return  this.sort((a,b)=>b-a)[0];
    }

    let  list  = [1,2,3,6,4,10,3];
     let  max= list.max();
     alert(max);


</script>
</html>